// ActiveObject.h: interface for the ActiveObject class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ACTIVEOBJECT_H__AB1782D3_6A97_40E1_9681_B7E012E311AC__INCLUDED_)
#define AFX_ACTIVEOBJECT_H__AB1782D3_6A97_40E1_9681_B7E012E311AC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CThreadObject
{
public:
    CThreadObject ();
    virtual ~CThreadObject () {}
    void Kill ();

protected:
    virtual void InitThread () = 0;
    virtual void Run () = 0;
    virtual void FlushThread () = 0;

    static DWORD WINAPI ThreadEntry (void *pArg);

    int             _isDying;
    Thread          _thread;
};

#endif // !defined(AFX_ACTIVEOBJECT_H__AB1782D3_6A97_40E1_9681_B7E012E311AC__INCLUDED_)
